package org.eiahe.hr.attendance.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.eiahe.hr.attendance.domain.AttendanceRecord;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * 考勤明细视图对象 hr_attendance_record
 *
 * @author zhangnn
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = AttendanceRecord.class)
public class AttendanceRecordVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 记录ID
     */
    @ExcelProperty(value = "记录ID")
    private Long recordId;

    /**
     * 工号
     */
    @ExcelProperty(value = "工号")
    private String employeeNo;

    /**
     * 员工姓名
     */
    @ExcelProperty(value = "员工姓名")
    private String employeeName;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 考勤日期
     */
    @ExcelProperty(value = "考勤日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate attendanceDate;

    /**
     * 打卡时间
     */
    @ExcelProperty(value = "打卡时间")
    @JsonFormat(pattern = "HH:mm:ss")
    private LocalTime clockTime;

    /**
     * 打卡类型(1上班 2下班)
     */
    @ExcelProperty(value = "打卡类型")
    private String clockType;

    /**
     * 打卡方式(1考勤机 2手机APP 3网页 4手动补录)
     */
    @ExcelProperty(value = "打卡方式")
    private String clockMethod;

    /**
     * 设备ID
     */
    @ExcelProperty(value = "设备ID")
    private String deviceId;

    /**
     * 定位信息
     */
    @ExcelProperty(value = "定位信息")
    private String location;

    /**
     * 考勤状态(0正常 1迟到 2早退 3旷工 4请假 5外勤 6非工作日)
     */
    @ExcelProperty(value = "考勤状态")
    private String attendanceStatus;

    /**
     * 异常原因
     */
    @ExcelProperty(value = "异常原因")
    private String exceptionReason;

    /**
     * 是否重复打卡(0否 1是)
     */
    @ExcelProperty(value = "是否重复打卡")
    private String isDuplicate;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
}
